package com.ojoin.trade.supplyloan_core.web.dao;

import java.util.List;

import org.springframework.data.domain.Pageable;

import com.ojoin.trade.common.web.dao.BaseDao;
import com.ojoin.trade.supplyloan_core.web.domain.TbSlSupplyPayment;

public interface TbSlSupplyPaymentDao extends BaseDao<TbSlSupplyPayment> {

	/**
	 * 按平台用户删除历史数据
	 * id_merchant_user_platform_name
	 */
	int deleteByPlatformAccountId(Integer platformAccountId,String rowCreateTime);
	
	void deleteRepeat(int platformAccountId);
	
	/**
	 * 按平台账号以及业务时间查询
	 * 
	 * 
	 */ 
	
	List<TbSlSupplyPayment> queryByUidAndCreateDate(int platformAccountId,String createDateStart,String createDateEnd, String settlementState,Pageable page);

	/**
	 * 按平台账号以及入库时间
	 * 
	 * 
	 */ 

	List<TbSlSupplyPayment> queryByUidAndRowCreate(int platformAccountId,String rowCreateTimeStart,String rowCreateTimeEnd, String settlementState,Pageable page);

	List<TbSlSupplyPayment> queryByUidAndRowCreateAndCreateDate(int platformAccountId,String rowCreateTimeStart,String rowCreateTimeEnd, String createDateStart,String createDateEnd,String settlementState,Pageable page);

	List<TbSlSupplyPayment> queryByUidAndRowUpdate(int platformAccountId,String rowUpdateTimeStart,String rowUpdateTimeEnd, String settlementState,Pageable page);

	long querySupplyPaymentMoney(int platformAccountId,String createDateStart,String createDateEnd);

	long querySupplysettlementMoney(int platformAccountId,String createDateStart,String createDateEnd,String rowCreateTimeStart,String rowCreateTimeEnd,String settlementState);
	

	String getLastInsertTime(int platformAccountId) ;
	
	String getLastcreateDate(int platformAccountId,String settlementState);
	
	String getLastsettlementDate(int platformAccountId);
}
